<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <a href="#/aaa">qqq</a>
  <a href="#/ccc">qqq2</a>
  <a href="#/sss">qqq3</a>
  <a href="#/ddd">qqq4</a>
</body>
</html>
<script>
  window.onhashchange = function(){
    console.log(location.hash)
  }
</script>